﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace EFEntity
{
   public class MyDbContext:DbContext
    {
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseSqlServer("Data Source=.;Initial Catalog=HR;Integrated Security=True");
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
          var etest=  modelBuilder.Entity<ETest>();
            etest.ToTable("Test");
            etest.Property(e => e.Name).HasMaxLength(20);
            etest.Property(e => e.Password).HasMaxLength(20);
        }
        public DbSet<ETest> Tests { get; set; }
        public DbSet<Ebonus> bonus { get; set; }
        public DbSet<Econfig_file_first_kind> config_file_first_kind { get; set; }
        public DbSet<Econfig_file_second_kind> config_file_second_kind { get; set; }
        public DbSet<Econfig_file_third_kind> config_file_third_kind { get; set; }
        public DbSet<Econfig_major> config_major { get; set; }
        public DbSet<Econfig_major_kind> config_major_kind { get; set; }
        public DbSet<Econfig_primary_key> config_primary_key { get; set; }
        public DbSet<Econfig_public_char> config_public_char { get; set; }
        public DbSet<Econfig_question_first_kind> config_question_first_kind { get; set; }
        public DbSet<Econfig_question_second_kind> config_question_second_kind { get; set; }
        public DbSet<Eengage_answer> engage_answer { get; set; }
        public DbSet<Eengage_answer_details> engage_answer_details { get; set; }
        public DbSet<Eengage_interview> engage_interview { get; set; }
        public DbSet<Eengage_exam> engage_exam { get; set; }
        public DbSet<Eengage_exam_details> engage_exam_details { get; set; }
        public DbSet<Eengage_major_release> engage_major_release { get; set; }
        public DbSet<Eengage_resume> engage_resume { get; set; }
        public DbSet<Eengage_subjects> engage_subjects { get; set; }
        public DbSet<Ehuman_file> human_file { get; set; }
        public DbSet<EHumanFile_dig> HumanFile_dig { get; set; }
        public DbSet<Emajor_change> major_change { get; set; }
        public DbSet<Esalary_grant_details> salary_grant_details { get; set; }
        public DbSet<Esalary_grant> salary_grant { get; set; }
        public DbSet<Esalary_standard> salary_standard { get; set; }
        public DbSet<Esalary_standard_details> salary_standard_details { get; set; }
        public DbSet<Etraining> training { get; set; }
        public DbSet<Eusers> users { get; set; }
    }
}
